package com.woniu.cms.auth.core.mapper;

import com.woniu.cms.auth.core.entity.RbacRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author lilili
 * @since 2022-09-16
 */
public interface RbacRoleMapper extends BaseMapper<RbacRole> {

    List<RbacRole> allByUserId(Integer userId);

    int doAllot(@Param("userId") Integer userId, @Param("roleIds") Integer[] roleIds);

    int doUnAllot(@Param("userId") Integer userId, @Param("roleIds") Integer[] roleIds);
}
